import Home from '../views/Layout/Home.vue';
import Login from '../views/Layout/Login/index.vue';

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    meta: {
      title: '首页',
      hidden: false,
      icon: 'home',
    },
    children: [
      {
        path: '/index',
        name: 'Index',
        meta: {
          title: '统计',
          hidden: false,
          icon: 'read',
        },
        component: () => import('@/views/page/index.vue'),
      },
    ],
  },
  {
    path: '/login',
    name: 'Login',
    meta: {
      title: '登录',
      hidden: true,
    },
    component: Login,
  },
  {
    path: '/about',
    name: 'About',
    meta: {
      title: 'about',
      hidden: true,
    },
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue'),
  },
];
export default routes;
